<div class="container">
  <h2 class="main_title">Order Detail</h2>
  <div class="def_width_100 f_left"> 
  <?php
  		if(isset($order_item) and ($order_item))
		{
  ?>
    <div class="def_width_100 f_left">
    
      <h3 class="mid_title">Order ID : <?php echo $order_id; ?></h3>
      <div class="sell_order_mana">
        <table width="100%" cellspacing="0" cellpadding="0" border="0" class="grid_table_list_2">
          <tbody>
            <tr bgcolor="#eeeeee">
              <td width="38%" style="text-align:left; padding-left:8px;" class="text_def_13"><h3>Shipping Address</h3>
              <?php 
			  		echo "<span> ".$order_item['OrderDetail']['Address']['name']."<br>".$order_item['OrderDetail']['Address']['add1']."<br>
					".$order_item['OrderDetail']['Address']['add2']."<br>".$order_item['OrderDetail']['Address']['city']."<br>
					".$order_item['OrderDetail']['Address']['state']."<br>".$order_item['OrderDetail']['Address']['zip']."<br>
					".$order_item['OrderDetail']['Address']['country']."<br>".$order_item['OrderDetail']['Address']['phone']."</span>";
			  ?>
              </td>
              <td width="35%"><div class="def_width_100 text_def_13">
                  <div class="width_40 f_left"><b>Purchase Date :</b></div>
                  <div style="text-align:left;" class="width_60 f_left"><?php echo $order_item['OrderItem']['created']; ?></div>
                  <div class="clr"></div>
                  <div class="width_40 f_left"><b>Expected Ship Date :</b></div>
                  <div style="text-align:left;" class="width_60 f_left">
				  
				  <?php 
				  if(isset($order_item['OrderItem']['shipped']) and ($order_item['OrderItem']['shipped']==0))
				  {
					  echo "Not Shiiped Yet!";
				  }else
				  {
				    echo $order_item['OrderItem']['shipping_start_date'];
				  }?> 
				</div>
                  <div class="clr"></div>
                  <div class="width_40 f_left"><b>Estimated Delivery :</b></div>
                  <div style="text-align:left;" class="width_60 f_left">
				  <?php 
				  if(isset($order_item['OrderItem']['shipped']) and ($order_item['OrderItem']['shipped']==0))
					  {
						   echo "Not Shiiped Yet!";
					  }else
					  {
				  		echo $order_item['OrderItem']['shipping_end_date']; 
					  }?></div>
                  <div class="clr"></div>
                  <div class="width_40 f_left"><b>Shipping Services :</b></div>
                  <div style="text-align:left;" class="width_60 f_left">Standard</div>
                  <div class="clr"></div>
                  <div class="width_40 f_left"><b>Contact Buyer :</b></div>
                  <div style="text-align:left;" class="width_60 f_left">
                <?php echo
						$html->link($order_item['OrderDetail']['User']['name'],
						array('action'=>'seller_do_mail',$order_item['OrderDetail']['User']['hash'], 
						$order_item['OrderDetail']['Order']['tracking_id']),array('class'=>''));
				  ?>
                  </div>
                  <div class="clr"></div>
                  <div class="width_40 f_left"><b>Billing Country :</b></div>
                  <div style="text-align:left;" class="width_60 f_left"><?php echo $order_item['OrderDetail']['Address']['country']; ?></div>
                  <div class="clr"></div>
                  <div class="width_40 f_left"><b>Sales Channel :</b></div>
                  <div style="text-align:left;" class="width_60 f_left"><a href="<?php echo $website_url; ?>">Wondere.com</a></div>
                  <div class="clr"></div>
                  <div class="width_40 f_left"><b>Url :</b></div>
                  <div style="text-align:left;" class="width_60 f_left"><?php echo $website_url; ?></div>
                  <div class="clr"></div>
                  <div class="width_40 f_left"><b>Fulfilment Channel :</b></div>
                  <div style="text-align:left;" class="width_60 f_left">Merchant</div>
                  <div class="clr"></div>
                </div></td>
              <td width="22%"><div class="def_width_100 f_left">
                  <div style="text-align:right;" class="width_60 f_left">Sub Total:</div>
                  <div class="width_40 f_right"><b>$<?php echo $order_item['OrderItem']['price']; ?></b></div>
                  <div class="clr"></div>
                  <div style="text-align:right;" class="width_60 f_left">Shipping Total:</div>
                  <div class="width_40 f_right"><b>$0</b></div>
                  <div class="common_border"></div>
                  <div style="text-align:right;" class="width_60 f_left"><b>Total:</b></div>
                  <div class="width_40 f_right blue_text"><b>$<?php echo $order_item['OrderItem']['price']; ?></b></div>
                </div></td>
            </tr>
          </tbody>
        </table>
      </div>
      <div class="sell_order_mana">
        <table width="100%" cellspacing="0" cellpadding="0" border="0" class="grid_table_list_2">
          <tbody>
            <tr class="tGb_blk">
              <th width="39%">Product Details</th>
              <th width="7%">Status</th>
              <th width="7%">Quaitity Ordered</th>
              <th width="7%">Quaitity Shipped</th>
              <th width="8%">Prices</th>
              <th width="27%">Total</th>
            </tr>
            <tr>
              <td width="39%" style="text-align:left;" class="text_def_13">
              
              <a class="blue_link" href="#"><b>
			  <?php 
			  echo $html->link($order_item['Product']['name'], 
			  array('controller'=>'products', 'action'=>'product', 
			  $order_item['Product']['slug']), array('escape'=>false));
			  ?></b></a><br>
                <span> <b>QTY :</b> <?php echo $order_item['OrderItem']['qty']; ?><br>
                <b>WSIN :</b> <?php echo $order_item['Product']['wisn']; ?> <br>
                <b>SKU :</b> <?php echo $order_item['Product']['MasterProduct']['sku']; ?><br>
                <b>Order Item Id :</b> <?php echo $order_item['OrderItem']['order_Item_Id']; ?><br>
                <b>Condition :</b>&nbsp; <?php echo $order_item['Product']['condition']['name']; ?><br>
                </span></td>
              <td width="7%">
              	<?php
					if(isset($order_item['OrderItem']['shipped']) and ($order_item['OrderItem']['shipped']==0))
						{
							echo "unshipped";
						}
					else
						{
							echo "shipped";
						}
                 ?>
              
              </td>
              <td width="7%">    
                        	<?php
					if(isset($order_item['OrderItem']['shipped']) and ($order_item['OrderItem']['shipped']==0))
						{
							echo "0";
						}
					else
						{
							echo $order_item['OrderItem']['qty'];
							
						}
                 ?>
</td>
              <td width="7%"><?php echo $order_item['OrderItem']['qty']; ?></td>
              <td width="8%">$<?php echo $order_item['OrderItem']['price']; ?></td>
              <td width="27%"><div class="def_width_100 f_left">
                  <div style="text-align:right;" class="width_60 f_left">Sub Total:</div>
                  <div class="width_40 f_right"><b>$<?php echo $order_item['OrderItem']['price']; ?></b></div>
                  <div class="clr"></div>
                  <div style="text-align:right;" class="width_60 f_left">Shipping Total:</div>
                  <div class="width_40 f_right"><b>$0</b></div>
                  <div class="common_border"></div>
                  <div style="text-align:right;" class="width_60 f_left"><b>Total:</b></div>
                  <div class="width_40 f_right blue_text"><b>$<?php echo $order_item['OrderItem']['price']; ?></b></div>
                </div></td>
            </tr>
            <tr>
              <td width="100%" colspan="6"><div class="common_border_1"></div></td>
            </tr>
            <tr bgcolor="#eeeeee">
              <td width="68%" style=" text-align:right;" colspan="5"><span class="blue_text">
                <h3>Total Charges to Client :</h3>
                </span></td>
              <td width="27%"><div class="width_40 f_right "><span class="blue_text">
                  <h3>$<?php echo $order_item['OrderItem']['price']; ?></h3>
                  </span></div></td>
            </tr>
          </tbody>
        </table>
      </div>
      <div class="def_width_100"> <a href="#" class="org_link f_right">Refund</a> </div>
    </div>
    <?php
		}
	?>
</div>
